package com.leyou.order.client;

import com.leyou.order.dto.OrderDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author RudolfHugh
 * @since 2020/5/29 19:11
 */
@FeignClient("order-service")
public interface OrderClient {

    /**
     * 创建订单接口
     * @param orderDTO          接收请求的参数
     * @return                  返回订单ID
     */
    @PostMapping("/order")
    public Long createOrder(@RequestBody OrderDTO orderDTO);
}
